Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github_user should override namespace.name for legacy roles. #1923

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

jctanner
Copy link
Collaborator

@jctanner jctanner commented Oct 6, 2023

there are 5408 roles on old galaxy where the github_user doesn't match the role's namespace name

So when you install laniakea.galaxy, the role found via ?owner_username=laniakea&name=galaxy is http://old-galaxy.ansible.com/api/v1/roles/51041/ ... which has a github_user key with value Laniakea-elixir-it

The way that worked was the role model linked to a repository model and the repository model linked to a provider namespace model ... the provider namespace's "name" property is what the role serializer emits for github_user

I'm not sure what this means for future imports of the roles considering the authors need to provide the proper org|user name to the CLI ... so I'll have to do some testing on that.

After this fix is deployed, we'll have to inject the missing field into all of the relevant roles' full_metadata column.

@github-actions github-actions bot added backport-4.2 This PR should be backported to stable-4.2 (1.2) backport-4.4 This PR should be backported to stable-4.4 (2.1) backport-4.5 This PR should be backported to stable-4.5 (2.2) backport-4.6 This PR should be backported to stable-4.6 (2.3) backport-4.7 This PR should be backported to stable-4.7 (2.4) backport-4.8 This PR should be backported to stable-4.8 (2.4) labels Oct 6, 2023
@jctanner jctanner removed backport-4.2 This PR should be backported to stable-4.2 (1.2) backport-4.4 This PR should be backported to stable-4.4 (2.1) backport-4.5 This PR should be backported to stable-4.5 (2.2) backport-4.6 This PR should be backported to stable-4.6 (2.3) backport-4.7 This PR should be backported to stable-4.7 (2.4) backport-4.8 This PR should be backported to stable-4.8 (2.4) labels Oct 6, 2023
@jctanner jctanner force-pushed the DEBUG_ROLE_MAPPING branch from b94fc34 to 926d0eb Compare October 9, 2023 20:09
@jctanner jctanner merged commit d5d0e27 into ansible:master Oct 9, 2023
19 checks passed
@ifalatik
Copy link

Is this also why my role https://galaxy.ansible.com/ui/standalone/roles/ifalatik/docker_project_deployment/ (GitHub -> https://github.com/ifalatik/docker-project-deployment) can't be updated from the galaxy UI? I can't see the versions / documentation either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants